package com.itheima.dao;

import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserDao {

    //查询所有
    @Select("select * from user")
    List<User> queryAll();

    // 添加新的用户
    @Insert("insert into user(id,name,sex,address) values (null,#{name},#{sex},#{address})")
    void add(User user);
}
